package model

import "encoding/json"

// 密钥生成中心返回消息
// const (
//
//	name =
//
// )
type ResClient struct {
	Device
	PrivateKey
	PublicKey
}

type ResGataway struct {
	Device
	PublicKey
}

func (r *ResClient) Typeis() int {
	return ClientPem
}

// 直接返回了
func (r *ResClient) ToBytes() []byte {
	marshal, err := json.Marshal(r)
	if err != nil {
		panic(err)
	}
	return marshal
}

//func (r *ResGataway) Typeis() int {
//	return GatawayPem
//}

// //直接返回了
func (r *ResGataway) ToBytes() []byte {
	marshal, err := json.Marshal(r)
	if err != nil {
		panic(err)
	}
	return marshal
}
